<template>
	<div>

		<el-form :model="info" class="w-full" label-width="100px">
			<el-form-item :label="$t('public.quantity') + ':'" prop="quantity">
				<el-input v-model.number="info.quantity" :placeholder="$t('message.pleaseEnter')" />
			</el-form-item>
			<div class="w-full text-center">
				<div class="inline-block">
					<el-button type="primary" @click="submit">{{ $t('public.save') }}</el-button>
					<el-button @click="cancel">{{ $t('public.cancel') }}</el-button>
				</div>
			</div>
		</el-form>

	</div>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
const { t: $t } = useI18n()
let emit = defineEmits(['qantity'])
let props = defineProps({
	info: {
		// 主体数据
		type: Object,
		default: {}
	}
})

// 提交
let submit = () => {
	let info = props.info
	emit('qantity', info)
}

// 取消
let cancel = () => {
	emit('qantity', false)
}

</script>
